Branch Elimination via Multi-variable Condition Merging
نویسندگان
چکیده
Conditional branches are expensive. Branches require a signi cant percentage of execution cycles since they occur frequently and cause pipeline ushes when mispredicted. In addition, branches result in forks in the control ow, which can prevent other code-improving transformations from being applied. In this paper we describe pro le-based techniques for replacing the execution of a set of two or more branches with a single branch on a conventional scalar processor. First, we gather pro le information to detect the frequently executed paths in a program. Second, we detect sets of conditions in frequently executed paths that can be merged into a single condition. Third, we estimate the bene t of merging each set of conditions. Finally, we restructure the control ow to merge the sets that are deemed bene cial. The results show that eliminating branches by merging conditions can signi cantly reduce the number of conditional branches performed in non-numerical applications.
منابع مشابه
Branch elimination by condition merging
Conditional branches are expensive. Branches require a significant percentage of execution cycles since they occur frequently and cause pipeline flushes when mispredicted. In addition, branches result in forks in the control flow, which can prevent other code-improving transformations from being applied. In this paper we describe profile-based techniques for replacing the execution of a set of ...
متن کاملA Multi-level Memetic/Exact Hybrid Algorithm for the Still Life Problem
Bucket elimination (BE) is an exact technique based on variable elimination. It has been recently used with encouraging results as a mechanism for recombining solutions in a memetic algorithm (MA) for the still life problem, a hard constraint optimization problem based on Conway’s game of life. This paper studies expanded multi-level models in which this exact/metaheuristic hybrid is further hy...
متن کاملMap-merging in Multi-robot Simultaneous Localization and Mapping Process Using Two Heterogeneous Ground Robots
In this article, a fast and reliable map-merging algorithm is proposed to produce a global two dimensional map of an indoor environment in a multi-robot simultaneous localization and mapping (SLAM) process. In SLAM process, to find its way in this environment, a robot should be able to determine its position relative to a map formed from its observations. To solve this complex problem, simultan...
متن کاملExtending Broken Triangles and Enhanced Value-Merging
Broken triangles constitute an important concept not only for solving constraint satisfaction problems in polynomial time, but also for variable elimination or domain reduction by merging domain values. Specifically, for a given variable in a binary arc-consistent CSP, if no broken triangle occurs on any pair of values, then this variable can be eliminated while preserving satisfiability. More ...
متن کامل